package cn.jtfadmin.activiti.config;

import cn.jtfadmin.base.lang.common.utils.IdGenUtils;
import org.activiti.spring.SpringProcessEngineConfiguration;
import org.activiti.spring.boot.DataSourceProcessEngineAutoConfiguration;
import org.activiti.spring.boot.JpaProcessEngineAutoConfiguration;
import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import javax.cache.CacheManager;
import java.util.Arrays;

/**
 * 自定义配置引擎配置
 * @author jtf
 * @since 0.0.2
 */
@Configuration
public class CustomerProcessEngineConfigurationConfigurer implements ProcessEngineConfigurationConfigurer {

    @Autowired
    protected CacheManager cacheManager;

    @Override
    public void configure(SpringProcessEngineConfiguration processEngineConfiguration) {

//        processEngineConfiguration.setIdGenerator(()->IdGenUtils.md5Gen());
    }
}
